//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package org.ares.app.demo.daos;

import java.util.List;
import javax.transaction.Transactional;
import org.ares.app.demo.entities.SUser;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

public interface UserDao extends JpaRepository<SUser, String> {
    SUser findByUsername(String var1);

    @Transactional
    @Modifying
    @Query("update SUser u set u.role='adv_user' where u.username=?1 and username<>'admin'")
    int setAdvUser(String var1);

    @Transactional
    @Modifying
    @Query("update SUser u set u.role='nor_user' where u.username=?1 and username<>'admin'")
    int setNorUser(String var1);

    @Transactional
    @Modifying
    @Query("update SUser u set u.role=null where u.username=?1 and username<>'admin'")
    int disableUser(String var1);

    @Query("select u from SUser u where u.username<>'admin' and length(u.username)=5")
    List<SUser> queryAll(Pageable var1);

    @Query("select u from SUser u where u.username<>'admin'")
    List<SUser> queryAllUser();

    List<SUser> findByUsernameNotLike(String var1);
}
